@import plugins.Context
@import controllers.rules.routes.Assets
@import org.silkframework.rule.LinkSpec

@(context: Context[LinkSpec])(implicit session: play.api.mvc.Session)

@header = {
  <link type="text/css" href="@Assets.at("stylesheets/table.css")" rel="stylesheet" />
  <link type="text/css" href="@Assets.at("stylesheets/pagination.css")" rel="stylesheet" />
  <link rel="stylesheet" href="@Assets.at("stylesheets/treeview/jquery.treeview.css")" type="text/css" />
  <link type="text/css" href="@Assets.at("stylesheets/linkageRuleTree.css")" rel="stylesheet" />

  <script src="@Assets.at("js/jquery.pagination.js")" type="text/javascript"></script>
  <script src="@Assets.at("js/jquery.treeview.js")" type="text/javascript"></script>
  <script src="@Assets.at("js/population.js")" type="text/javascript"></script>

  <script type="text/javascript">
    initPopulation('populationView');
  </script>
}

@toolbar = {
  <ul>
    <li>
      <button onclick="window.location = '@config.baseUrl/linking/@context.project.name/@context.task.id/learn'" >Back</button>
    </li>
  </ul>
}

@content = {
  <div class="wrapper">
    <div id="tree-header">
      <div class="left">
        <div class="toggle-all"><div class="plus"></div><a href="#" onclick="expand_all();">Expand All</a></div>
        <div class="toggle-all"><div class="minus"></div><a href="#" onclick="hide_all();">Collapse All</a></div>
      </div>
      <div class="middle">
        <div class="navigation"></div>
      </div>
    </div>

    <div style="clear: both"></div>

    <p>
      <div id="populationView">
      </div>
    </p>

    <div style="clear:both;"></div>

    <div id="tree-footer">
      <div class="navigation"></div>
    </div>

    <div style="clear: both"></div>

  </div>
}

@main(Some(context))(header)(toolbar)(content)